<template>
  <div>
    <input type="text" v-model.number="num1" />
    <input type="text" v-model.number="num2" />
    <p>和: {{ sum }}</p>
    <p>差:{{ defference }}</p>
    <p>平均值:{{ pjz }}</p>
  </div>
</template>

<script>
import { ref } from "vue";
import { getSum } from "./hooks/use-sum.js";
import { Difference } from "./hooks/use-Difference.js";
import { getpjz } from "./hooks/use-pjz.js";
export default {
  setup() {
    let num1 = ref(0);
    let num2 = ref(0);
    let sum = getSum(num1, num2);
    let defference = Difference(num1, num2);
    let pjz = getpjz(num1, num2);
    return {
      num1,
      num2,
      defference,
      sum,
      pjz,
    };
  },
};
</script>

<style></style>
